#CMAKE_MINIMUM_REQUIRED(VERSION 3.2.3 FATAL_ERROR)

PROJECT(QCustomplot)

message(--------------------------------------------------------------------------------------------------------------) 
message( STATUS project = ${PROJECT_NAME})
#qt
SET(CMAKE_PREFIX_PATH $ENV{QT_HOME})
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
SET(CMAKE_AUTOMOC ON)
SET(CMAKE_AUTOUIC ON)
SET(CMAKE_AUTORCC ON)
#FIND_PACKAGE(Qt5 COMPONENTS Core Widgets PrintSupport script REQUIRED)

FILE(GLOB HDR_FILES *.h)
AUX_SOURCE_DIRECTORY(. SRC_FILES)
ADD_LIBRARY(${PROJECT_NAME} STATIC
${SRC_FILES}
${HDR_FILES}
)
 
#FIND_PACKAGE(Qt5 REQUIRED COMPONENTS Core Widgets Quick  PrintSupport Concurrent OpenGL Multimedia MultimediaWidgets AxContainer AxBase  WebSockets Xml  Script)

include_directories(${Qt5Core_INCLUDE_DIRS})
###########################################################

 TARGET_LINK_LIBRARIES(${PROJECT_NAME} Qt5::Widgets Qt5::Gui Qt5::Core Qt5::PrintSupport Qt5::Script)
 

IF(MSVC)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/MP")
CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/../../other/VSUserTemplate.vcxproj.user" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}.vcxproj.user")
ADD_DEFINITIONS(-D_WIN32_WINNT=0x0600 -D_CRT_SECURE_NO_WARNINGS)
ENDIF(MSVC)

message( STATUS END_OF_${PROJECT_NAME})
message(--------------------------------------------------------------------------------------------------------------) 
